/*
 * @Author: gonglf
 * @Date: 2022-09-27 16:00:59
 * @LastEditors: gonglf
 * @LastEditTime: 2022-09-27 16:02:11
 * @Description:
 *
 */
package dal

import (
	"context"

	"github.com/pkg/errors"
	"gorm.io/gorm"
)

type QuestionModelDal struct {
	DB *gorm.DB
}

func NewQuestionModelDal(db *gorm.DB) *QuestionModelDal {
	return &QuestionModelDal{
		DB: db,
	}
}

func (dal *QuestionModelDal) Create(ctx context.Context, item string) error {
	result := dal.DB.Create(item)
	return errors.WithStack(result.Error)
}
